// 任务广场显积分的格式(暂定是否需要)
const priceFormat = (price: String) => {
  const length = price.length
  if (length < 4) return price
  else {
    price = price.replace(/(0+)$/g, '')
    if (length - price.length == 3) return price + 'k'
    else {
      const ary = price.split('')
      ary.splice(1, 0, '.')
      return ary.join('')
    }
  }
}

export { priceFormat }
